package gameserver.model.gameobjects.stats;


public enum StatEnum
{
	SCORERATIO(0,"scoreratio"),
	COINRATIO(1,"coinratio"),
	EXPRATIO(2,"expratio"),
	CHARM(3,"charm"),
	CHARMRATIO(4,"charmratio");
	
	private int id;
	private String name;
	
	StatEnum(int _id,String _name)
	{
		this.id = _id;
		this.name = _name;
	}

	public int getId()
	{
		return id;
	}

	public String getName()
	{
		return name;
	}
	
	public static StatEnum find(int _id)
	{
		for(StatEnum s : values())
		{
			if(s.getId() == _id)
				return s;
		}
		return null;
	}
	
	public static StatEnum findByName(String _name)
	{
		for(StatEnum s : values())
		{
			if(s.getName().toLowerCase().equals(_name))
				return s;
		}
		return null;
	}
}
